home *** CD-ROM | disk | FTP | other *** search
- HYPOT(3M) Last changed: 2-2-99
-
-
- NNAAMMEE
- hhyyppoott, hhyyppoottff, ffhhyyppoott, hhyyppoottll, ccaabbss, ccaabbssff, ffccaabbss, ccaabbssll - Euclidean
- distance, complex absolute value
-
- SSYYNNOOPPSSIISS
- ##iinncclluuddee <<mmaatthh..hh>>
-
- ddoouubbllee hhyyppoott ((ddoouubbllee _x,, ddoouubbllee _y));;
- ffllooaatt ffhhyyppoott ((ffllooaatt _x,, ffllooaatt _y));;
- ffllooaatt hhyyppoottff ((ffllooaatt _x,, ffllooaatt _y));;
- lloonngg ddoouubbllee hhyyppoottll ((lloonngg ddoouubbllee _x,, lloonngg ddoouubbllee _y));;
-
- ddoouubbllee ccaabbss ((ssttrruucctt {{ ddoouubbllee _a,,_b;; }} _z));;
- ffllooaatt ffccaabbss ((ssttrruucctt {{ ffllooaatt _a,,_b;; }} _z));;
- ffllooaatt ccaabbssff ((ssttrruucctt {{ ffllooaatt _a,,_b;; }} _z));;
- lloonngg ddoouubbllee ccaabbssll ((ssttrruucctt {{ lloonngg ddoouubbllee _a,,_b;; }} _z));;
-
- IIMMPPLLEEMMEENNTTAATTIIOONN
- IRIX systems
-
- DDEESSCCRRIIPPTTIIOONN
- hhyyppoott((_x,,_y)), ffhhyyppoott((_x,,_y)), hhyyppoottff((_x,,_y)), hhyyppoottll((_x,,_y)), ccaabbss((_x,,_y)),
- ffccaabbss((_x,,_y)), ccaabbssff((_x,,_y)), and ccaabbssll((_x,,_y)) return ssqqrrtt((xx**xx ++ yy**yy)) computed
- in such a way that overflow will not happen, and underflow occurs only
- if the final result deserves it.
-
- ffhhyyppoott, hhyyppoottff, ffccaabbss, and ccaabbssff are the same functions as hhyyppoott and
- ccaabbss but for the float data type.
-
- hhyyppoottll, and ccaabbssll are the same functions as hhyyppoott and ccaabbss but for the
- long double data type.
-
- NNOOTTEESS
- Long double operations on this system are only supported in _r_o_u_n_d-_t_o-
- _n_e_a_r_e_s_t rounding mode (the default). The system must be in round-to-
- nearest rounding mode when calling any of the long double functions,
- or incorrect answers will result.
-
- Users concerned with portability to other computer systems should note
- that the long double and float versions of these functions are
- optional according to the ANSI C Programming Language Specification
- ISO/IEC 9899 : 1990 (E).
-
- Long double functions have been renamed to be compliant with the
- ANSI-C standard; however, to be backward compatible, they may still be
- called with the double precision function name prefixed with a qq.
-
- hhyyppoott and ccaabbss are not ANSI-C functions. If you compile with the
- --aannssii option, you must supply your own prototypes for these functions
- or you get incorrect results. (See the prototypes defined in
- //uussrr//iinncclluuddee//mmaatthh..hh).
-
- EErrrroorrss
- Below 0.97 ULPs. Consequently hhyyppoott((55..00,,1122..00)) == 1133..00 exactly; in
- general, hhyyppoott and ccaabbss return an integer whenever an integer might be
- expected.
-
- RREETTUURRNN VVAALLUUEESS
- Functions in the standard math library lliibbmm..aa are referred to as --llmm
- versions. Those in lliibbmmxx..aa are referred to as --llmmxx versions. Those in
- the the BSD math library lliibbmm4433..aa are referred to as --llmm4433 versions.
-
- The --llmm and --llmmxx versions always return the default Quiet NaN and set
- eerrrrnnoo to EDOM when a NaN is used as an argument. A NaN argument
- causes the --llmm4433 versions of the hhyyppoott functions to return the same
- NaN, unless the other argument is HHUUGGEE__VVAALL, in which case HHUUGGEE__VVAALL is
- returned.
-
- The --llmm4433 versions never set eerrrrnnoo. The value of HHUUGGEE__VVAALL is IEEE
- Infinity.
-
- When the correct value would overflow, the hhyyppoott functions return
- HHUUGGEE__VVAALL. The --llmm and --llmmxx versions also set eerrrrnnoo to ERANGE. See
- mmaatthheerrrr(3M) for a description of error handling for --llmmxx functions.
-
- SSEEEE AALLSSOO
- mmaatthh(3M), ssqqrrtt(3M), mmaatthheerrrr(3M)
-
- This man page is available only online.
-